package com.ftf.tp.blog.domain.article.event;

import com.ftf.tp.blog.domain.article.aggregate.ArticleAgg;
import com.ftf.tp.common.constants.DomainEventEnum;
import com.ftf.tp.common.constants.EventStatusEnum;
import com.ftf.tp.common.core.utils.SnowIdUtils;

import java.time.LocalDateTime;

/**
 * @author tanghao
 * @date 2022/8/5
 */
public class PublishArticleEvent extends BaseDomainEvent<ArticleAgg> {

    public PublishArticleEvent(ArticleAgg articleAgg) {
        super(SnowIdUtils.uniqueLong(),
                articleAgg.getId(),
                DomainEventEnum.ARTICLE_PUBLISH,
                EventStatusEnum.PENDING,
                LocalDateTime.now(),
                articleAgg);
    }
}
